package com.work.work.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.work.work.dto.CreateTaskRequest;
import com.work.work.dto.ProjectTaskDTO;
import com.work.work.entity.Task;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.util.List;

public interface TaskService extends IService<Task> {
    boolean createTask(CreateTaskRequest request);
    Page<Task> getTasksByProjectId(Integer projectId, Integer current, Integer size);
    Page<Task> getTasksByAssignee(String assignee, Integer current, Integer size);
    // 更新任务状态
    boolean updateTaskStatus(Integer taskId, Integer status);

    // 获取项目任务列表
    List<ProjectTaskDTO> getProjectTasks(Integer projectId);

    // 计算并更新项目进度
    void updateProjectProgress(Integer projectId);



}